package com.lanou3g.k12.mapper;

import com.lanou3g.k12.entity.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CouponMapper {
    //连表查询所有
    List<Coupon> findAllCoupon();

    //查询coupon表全部字段
    List<Coupon> selectCoupon();

    //关键字查询
    List<Coupon> findByKeyword(String keyword);

    //通过ID查询
    Coupon findCouponById(Long id);

    //修改状态
    void updateStatus(Long id);

    List<CouponCode> getAllCodes(Long id);

    void upStatus(Long id);

    void userAndCoupon(UserCoupon userCoupon);

    List<UserCoupon> recordByUid(Long uid);

    List<Long> courseById(Long aLong);

    CouponCode voucherByCode(String code);

    Coupon SearchIdByName(String name);

    //新增
    int couponInsert(Coupon coupon);

    String courseNameById(Long aLong);

    Coupon couponNameById(Long aLong);

    List<CouponChapter> chapterById(Long aLong);

    Chapter chapterData(Long aLong);

    Long phoneByUserId(String phone);

    List<Long> chIdByCpid(Long cpId);

    void addUserChapter(@Param("uid") Long uid,@Param("aLong") Long aLong);
}


